home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / C / Comet2.1.3.cpt / include / rcodes.h < prev    next >
Text File  |  1991-10-17  |  5KB  |  165 lines

  1. /*
  2.     Copyright Cornell University 1986.  All rights are reserved.
  3. */
  4.  
  5. /*
  6.     This include file defines the internal result codes used in translating
  7.     user events into actions for the terminal emulator.  Each result code
  8.     is two bytes long, the first byte is the class type, and the second
  9.     is an entry id for that type. 
  10. */
  11.  
  12. /* token classes */
  13.  
  14. #define    RSLT_ASCI    0x20    /* ' ' ascii character    */
  15. #define RSLT_LCAC    0x41    /* 'A' IBM local action key    */
  16. #define RSLT_EMC    0x43    /* 'C' emulator control */
  17. #define RSLT_SCOPY    0x63    /* 'c' special copy routines */
  18. #define RSLT_DELAY    0x44    /* 'D' delay */
  19. #define RSLT_EDIT    0x45    /* 'E' EDIT action */
  20. #define RSLT_FILE    0x46    /* 'F' FILE action */
  21. #define RSLT_LOOP    0x4C    /* 'L' LOOP with count argument */
  22. #define RSLT_MVCR    0x4D    /* 'M' IBM cursor movement key */
  23. #define RSLT_PFKY    0x50    /* 'P' IBM program function key */
  24. #define RSLT_SEL1    0x53    /* 'S' selection Y start */
  25. #define RSLT_SEL2    0x54    /* 'T' selection X start */
  26. #define RSLT_SEL3    0x55    /* 'U' selection Y end */
  27. #define RSLT_SEL4    0x56    /* 'V' selection X end */
  28. #define RSLT_WIND    0x57    /* 'W' window selection action */
  29. #define RSLT_XCURS    0x58    /* 'X' cursor movement to x loc    */
  30. #define RSLT_YCURS    0x59    /* 'Y' cursor movement to y loc    */
  31. #define RSLT_MATCH    0x5A    /* 'Z' delay for input match */
  32.  
  33. #define RSLT_TELNET    0x74    /* 't' Telnet commands */
  34.  
  35.  
  36. /* RSLT_ASCI entries */
  37.  
  38. /* the entry for the rslt_asci type is the desired x location */
  39.  
  40. /* 'A' RSLT_LCAC entries */
  41.  
  42. #define BACKSP_BLANK    0x20    /* space */
  43. #define BACKSP_DEL    0x42        /* B */
  44. #define DEL_CHAR    0x44        /* D */
  45. #define    ERASE_EOF    0x45        /* E */
  46. #define INSRT        0x49        /* I */
  47. #define RESET          0x52        /* R */
  48. #define INPUT_ERASE    0x58        /* X */
  49.  
  50. /* RSLT_EMC entries */
  51.  
  52. #define EM_ALTMACRO        'A'        /* set the ALT (mousedown state) modifier bit */
  53. #define EM_NORMMACRO    'a'        /* always set ALT off */
  54. #define EM_CLOSE        'C'        /* Close the emulator session */
  55. #define EM_EDIT            'E'        /* show the textwindow */
  56. #define EM_FILLCLOSE    'F'        /* close the copyright/help textwindow */
  57. #define EM_HIDE            'H'        /* don't update the display */
  58. #define EM_LITERAL        'L'        /* display literals in ASCII emulators */
  59. #define EM_RESTORE        'R'        /* restore line 25 */
  60. #define EM_SHOW            'S'        /* update the display as usual */
  61. #define EM_TERM            'T'        /* show the "terminal" emwindow */
  62. #define EM_TRACK        't'        /* toggle cursor tracking */
  63. #define EM_TRYDSDRAW    'Z'        /* toggle fast drawing */
  64.  
  65. /* RSLT_LOOP entries */
  66.  
  67. /* DO WHILE loop begin: the entry for this class is the
  68.    number of times to repeat the loop; a 0 will cause the loop to be skipped,
  69.    a 255 will cause the loop to continue until interrupted by a "Command-.".
  70. */
  71.  
  72. /* RSLT_DELAY entries */
  73.  
  74. /* the entry is the time in seconds you wish to delay processing tokens */
  75.  
  76. /* RSLT_EDIT entries */
  77.  
  78. #define ED_SELALL        'A'
  79. #define ED_APPEND        'B'
  80. #define ED_COPY            'C'
  81. #define ED_SELRESET        'R'
  82. #define ED_STDMODE        'S'
  83. #define ED_TABLEMODE    'T'
  84. #define ED_PASTE        'V'
  85. #define ED_WORDSELECT    'W'
  86. #define ED_CUT            'X'
  87.  
  88. /* RSLT_FILE entries */
  89.  
  90. #define RF_APPEND        'A'
  91. #define RF_APPENDTO        'B'
  92. #define RF_PRINTDRAFT    'D'
  93. #define RF_NAME            'N'
  94. #define RF_PRINTSCREEN    'P'
  95. #define RF_PRINTTEXT    'p'
  96. #define RF_PRINTSCRAP    'Q'
  97. #define RF_SAVE            'S'
  98. #define RF_SAVEAS        'T'
  99.  
  100. /* entries for the RSLT_MVCR type (IBM cursor motion) */
  101.  
  102. #define HOME        0x30    /* 0 */
  103. #define BACK_TAB    0x3c    /* < */
  104. #define TAB_FWD        0x3e    /* > */
  105. #define DOWN_ARROW    0x44    /* D */
  106. #define LEFT_ARROW    0x4c    /* < */
  107. #define NEW_LINE    0x4e    /* N */
  108. #define RIGHT_ARROW 0x52    /* R */
  109. #define UP_ARROW    0x55    /* U */
  110.  
  111. /* entries for the RSLT_PFKY class (IBM Program Function keys) */
  112.  
  113. #define  PF1        0x1
  114. #define  PF2        0x2
  115. #define  PF3        0x3
  116. #define  PF4        0x4
  117. #define  PF5        0x5
  118. #define  PF6        0x6
  119. #define  PF7        0x7
  120. #define  PF8        0x8
  121. #define  PF9        0x9
  122. #define  PF10        0xa
  123. #define  PF11        0xb
  124. #define  PF12        0xc
  125. #define  PF13        0xd
  126. #define  PF14        0xe
  127. #define  PF15        0xf
  128. #define  PF16        0x10
  129. #define  PF17        0x11
  130. #define  PF18        0x12
  131. #define  PF19        0x13
  132. #define  PF20        0x14
  133. #define  PF21        0x15
  134. #define  PF22        0x16
  135. #define  PF23        0x17
  136. #define  PF24        0x18
  137. #define  PF25        0x19
  138. #define  PF26        0x1a
  139. #define  PF27        0x1b
  140. #define  PF28        0x1c
  141. #define  PF29        0x1d
  142. #define  PF30        0x1e
  143. #define  PF31        0x1f
  144. #define  PF32        0x20
  145. #define  PF33        0x21
  146. #define  PF34        0x22
  147. #define  PF35        0x23
  148. #define  PF36        0x24
  149. #define  PA1        0x31
  150. #define  PA2        0x32
  151. #define  PA3        0x33
  152. #define     CLEAR        0x43
  153. #define  ENTER        0x45
  154. #define  PFSHIFT    0x55
  155. #define  PFDUBSHIFT    0x57
  156.  
  157.  
  158. /* the entry for the RSLT_YCURS type is the desired row numbered from 0 */
  159. /* the entry for the RSLT_XCURS type is the desired column numbered from 0 */
  160.  
  161. /* the entry for the RSLT_SEL actions is the desired location numbered from 0 */
  162.  
  163. /* RSLT_TELNET entries */
  164.  
  165.